---
apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana
  namespace: monitoring
data:
  grafana.ini: |
    [analytics]
    check_for_updates = true
    [grafana_net]
    url = https://grafana.net
    [log]
    mode = console
    [paths]
    data = /var/lib/grafana/
    logs = /var/log/grafana
    plugins = /var/lib/grafana/plugins
    provisioning = /etc/grafana/provisioning
    [server]
    domain = grafana.kryukov.local
    root_url = https://grafana.kryukov.local
  datasources.yaml: |
    apiVersion: 1
    datasources:
      - access: proxy
        isDefault: true
        name: Victoria
        type: prometheus
        url: http://victoriametrics-victoria-metrics-single-server:8428
  dashboardproviders.yaml: |
    apiVersion: 1
    providers:
      - disableDeletion: true
        editable: false
        folder: ""
        name: default
        options:
          path: /var/lib/grafana/dashboards/default
        orgId: 1
        type: file
        updateIntervalSeconds: 30
